<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateWebHooksTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('web_hooks', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->integer('id', true)->comment('主键ID');
            $table->string('name', 200)->comment('项目名称');
            $table->string('description', 200)->comment('项目说明');
            $table->string('command', 200)->default('')->comment('执行的命令');
            $table->string('password', 100)->comment('密码');
            $table->string('token', 200)->comment('验证token');
            $table->boolean('type')->comment('项目类型 1 gitree 2 github 3 coding');
            $table->text('allow_ips', 65535)->comment('允许的IP信息，多个通过，区分');
            $table->boolean('status')->comment('状态 1 开启 2 关闭');
            $table->timestamps();
        });
    }


    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('web_hooks');
    }

}
